import Logo from '@/assets/images/logo.png';
import type { ReactNode } from 'react';
import { Link } from 'react-router-dom';
import { LogoLayout } from './AppStyle';

interface Props {
  children?: ReactNode | null;
  style?: React.CSSProperties;
}

export const AppLogo: React.FC<Props> = (props) => {
  const { style, children } = props;

  return (
    <LogoLayout className="logo" style={style}>
      <Link to="/">
        <img src={Logo} />
        {children}
      </Link>
    </LogoLayout>
  );
};
